package leetcode.code0014;

import leetcode.IDebug;
import leetcode.helper.HelpDebug;

public abstract class Solution0014 implements IDebug {

	public abstract String longestCommonPrefix(String[] strs);

	private void debug(String str1, String expect) {
		String[] strs = HelpDebug.str2array2(str1);
		String r = this.longestCommonPrefix(strs);
		HelpDebug.compare(expect, r);
	}

	@Override
	public void debug1() {
		String str1 = "[\"flower\",\"flow\",\"flight\"]";
		String expect = "fl";
		debug(str1, expect);
	}

	@Override
	public void debug2() {
		String str1 = "[\"dog\",\"racecar\",\"car\"]";
		String expect = "";
		debug(str1, expect);
	}

	@Override
	public void debug3() {
		// TODO Auto-generated method stub

	}

	@Override
	public void debug4() {
		// TODO Auto-generated method stub

	}

}
